import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class BoxPage extends StatelessWidget {
  const BoxPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter 容器盒子布局模型'),
      ),
      body: Center(
        child: Container(
          width: 300,
          height: 300,
          color: Colors.blue,
          child: Container(
            color: Colors.red,
            margin: const EdgeInsets.fromLTRB(10, 0, 20, 30),
            child: Container(
              margin: const EdgeInsets.fromLTRB(10, 10, 10, 10),
              color: Colors.white60,
              padding: const EdgeInsets.all(10),
              child:
                  const Text("这是一长段文字，这是一长段文字,这是一长段文字，这是一长段文字,这是一长段文字，这是一长段文字"),
            ),
          ),
        ),
      ),
    );
  }
}
